/**
 * 
 */
package com.sx.feesunit.biz.impl;

import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.sx.feesunit.biz.IPaymentsFeeBiz;
import com.sx.feesunit.dao.IPaymentsFeeDao;
import com.sx.feesunit.dao.IUserUnitDao;
import com.sx.feesunit.entity.PaymentsFeeEntity;
import com.sx.feesunit.exception.SXException;

/**
 * @author Administrator
 *
 */
public class PaymentsFeeBiz implements IPaymentsFeeBiz {
	private IPaymentsFeeDao ipaymentsfeedao;
	private Log log = LogFactory.getLog(this.getClass());
	/* (non-Javadoc)
	 * @see com.sx.feesunit.biz.IPaymentsFeeBiz#addPaymentFees(com.sx.feesunit.entity.PaymentsFeeEntity)
	 */
	public Integer addPaymentFees(PaymentsFeeEntity payments) throws Exception {
		try {
			return ipaymentsfeedao.addPaymentFees(payments);
		} catch (Exception e) {
			log.error("新增费用信息报错",e);
			throw new SXException(e);
			// TODO: handle exceptio
		}
	}

	/* (non-Javadoc)
	 * @see com.sx.feesunit.biz.IPaymentsFeeBiz#deletePaymentFees(com.sx.feesunit.entity.PaymentsFeeEntity)
	 */
	public boolean deletePaymentFees(PaymentsFeeEntity payments)
			throws Exception {
		try {
			return ipaymentsfeedao.deletePaymentFees(payments);
		} catch (Exception e) {
			log.error("删除PaymentsFee报错",e);
			throw new SXException(e);
			// TODO: handle exceptio
		}
	}

	/* (non-Javadoc)
	 * @see com.sx.feesunit.biz.IPaymentsFeeBiz#findPaymentFeesInfo(com.sx.feesunit.entity.PaymentsFeeEntity)
	 */
	public List<PaymentsFeeEntity> findPaymentFeesInfo(
			PaymentsFeeEntity payments) throws Exception {
		try {
			return this.ipaymentsfeedao.findPaymentFeesInfo(payments);
		} catch (Exception e) {
			log.error("查询收费信息报错",e);
			throw new SXException(e);
			// TODO: handle exceptio
		}
	}

	/* (non-Javadoc)
	 * @see com.sx.feesunit.biz.IPaymentsFeeBiz#findPaymentFeesInfoByAndCondiction(com.sx.feesunit.entity.PaymentsFeeEntity)
	 */
	public List<PaymentsFeeEntity> findPaymentFeesInfoByAndCondiction(
			PaymentsFeeEntity payments) throws Exception {
		try {
			return ipaymentsfeedao.findPaymentFeesInfoByAndCondiction(payments);
		} catch (Exception e) {
			log.error("修改费用or条件报错",e);
			throw new SXException(e);
			// TODO: handle exceptio
		}
	}

	/* (non-Javadoc)
	 * @see com.sx.feesunit.biz.IPaymentsFeeBiz#findPaymentFeesInfoByOrCondiction(com.sx.feesunit.entity.PaymentsFeeEntity)
	 */
	public List<PaymentsFeeEntity> findPaymentFeesInfoByOrCondiction(
			PaymentsFeeEntity payments) throws Exception {
		try {
			return ipaymentsfeedao.findPaymentFeesInfoByOrCondiction(payments);
		} catch (Exception e) {
			log.error("查询费用or条件报错",e);
			throw new SXException(e);
			// TODO: handle exceptio
		}
	}

	/* (non-Javadoc)
	 * @see com.sx.feesunit.biz.IPaymentsFeeBiz#updatePaymentFees(com.sx.feesunit.entity.PaymentsFeeEntity)
	 */
	public boolean updatePaymentFees(PaymentsFeeEntity payments)
			throws Exception {
		try {
			return this.ipaymentsfeedao.updatePaymentFees(payments);
		} catch (Exception e) {
			log.error("修改费用信息报错",e);
			throw new SXException(e);
			// TODO: handle exceptio
		}
	}

	/**
	 * @return the ipaymentsfeedao
	 */
	public IPaymentsFeeDao getIpaymentsfeedao() {
		return ipaymentsfeedao;
	}

	/**
	 * @param ipaymentsfeedao the ipaymentsfeedao to set
	 */
	public void setIpaymentsfeedao(IPaymentsFeeDao ipaymentsfeedao) {
		this.ipaymentsfeedao = ipaymentsfeedao;
	}
	
}
